function SkillTool(){

    this.width = 0;
    this.height = 0;

    this.MapLeft = 0;
    this.MapTop = 0;
    this.MapRight = 0;
    this.MapBottom = 0;

    this.speedX = 0;
    this.speedY = 0;
    this.posX = 0;
    this.posY = 0;
    this.lastPosX = 0;
    this.lastPosY = 0;
    this.visible = false;
    this.imgs;
    this.functionType = 0;

    this.InitSkillTool = function(width, height, ScreenWidth, ScreenHeight, speedX, speedY, centerX, centerY, imgs, functionType) {
        this.width = width;
        this.height = height;
        this.MapLeft = 0;
        this.MapTop = 0;
        this.MapRight = ScreenWidth - width;
        this.MapBottom = ScreenHeight - height;
        this.speedX = speedX;
        this.speedY = speedY;
        this.posX = centerX-width/2;
        this.posY = centerY-height/2;
        this.lastPosX = this.posX;
        this.lastPosY = this.posY;
        this.visible = true;
        this.imgs = imgs;
        this.functionType = functionType;
    };

    this.updatePos = function(){
        if(this.visible){
            this.lastPosX = this.posX;
            this.lastPosY = this.posY;
            this.posX = this.posX + this.speedX;
            this.posY = this.posY + this.speedY;

            if(this.posX > this.MapRight){
                this.posX = this.MapRight;
                this.speedX = -this.speedX;
            }
            if(this.posX < this.MapLeft){
                this.posX = this.MapLeft;
                this.speedX = -this.speedX;
            }
            if(this.posY > this.MapBottom){
                this.posY = this.MapBottom;
                this.speedY = -this.speedY;
            }
            if(this.posY < this.MapTop){
                this.posY = this.MapTop;
                this.speedY = -this.speedY;
            }
        }
    }

    this.paint = function(drawCanvas, effect_count){
        if(this.visible){
            drawCanvas.drawImage(this.imgs[0+(zhengchu(effect_count,4))%2], this.posX, this.posY);
        }
    }
}